package com.imooc.spring.ioc.class002;

public class ZhangSan {
    final private Car car;
    public ZhangSan(Car car) {
        this.car = car;
    }
    public void goHome() {
        car.start();
        car.turnLeft();
        car.turnRight();
        car.stop();
    }
    public void goShop() {
        car.start();
        car.turnLeft();
        car.turnRight();
        car.stop();
    }
}
